package com.xielx.ris.statistic.bean;

import java.io.Serializable;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

public class ReportRow implements Serializable {
    private final static String SQL = "insert into mpp_user_6b.mcl_tpl_country_mon_total_2020 (TJRQ, ZH_SF, SJLX, TJSL, GXSJ)"+
        "values('%s', '%s', '%s', '%s', to_date('%s','yyyy-mm-dd hh24:mi:ss'));";
    private static String tjrq;
    private String zh_sf;
    private String sjlx;
    private int tjsl;
    private static Date gxsj;

    public ReportRow() {
    }

    public ReportRow(String zh_sf) {
        this.zh_sf = zh_sf;
    }

    public String getTjrq() {
        return tjrq;
    }

    public static void setTjrq(String tjrq) {
        ReportRow.tjrq = tjrq;
    }

    public String getZh_sf() {
        return zh_sf;
    }

    public void setZh_sf(String zh_sf) {
        this.zh_sf = zh_sf;
    }

    public String getSjlx() {
        return sjlx;
    }

    public void setSjlx(String sjlx) {
        this.sjlx = sjlx;
    }

    public int getTjsl() {
        return tjsl;
    }

    public void setTjsl(int tjsl) {
        this.tjsl = tjsl;
    }

    public Date getGxsj() {
        return gxsj;
    }

    public static void setGxsj(Date gxsj) {
        ReportRow.gxsj = gxsj;
    }

    @Override
    public String toString() {
        DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        return String.format(SQL, tjrq,zh_sf,sjlx,tjsl,sdf.format(gxsj));
    }
}
